package com.edu.study.base.rest;

import com.edu.common.systemSetup.domain.SystemSetup;
import com.edu.common.systemSetup.service.ISystemSetupService;
import com.edu.study.base.tbVideoConfig.domain.TbVideoConfig;
import com.ruoyi.common.core.domain.AjaxResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api(tags = "系统设置相关接口")
@RestController
@RequestMapping("/api/sys")
public class AppSystemSetupController {

    @Autowired
     private ISystemSetupService systemSetupService;


    @ApiOperation("获取系统设置相关信息")
    @GetMapping("/list")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "type",value = "文本类型",required = false),

    })
    public AjaxResult getVideoConfig(String type){
        SystemSetup systemSetup = new SystemSetup();
        systemSetup.setTextType(type);
        List<SystemSetup> list = systemSetupService.selectSystemSetupList(systemSetup);
        return AjaxResult.success(list);
    }
}
